const router = require("koa-router")();
const main = require("../../models");

router.get("/home", async ctx => {
    var topCollection = await main("top250");
    var movies = await topCollection.find().toArray();
    await ctx.render("home", { movies });
})

module.exports = router;